<template>
  <div class="con-pd">
    <h1>手机密码登录</h1>
    <van-form @submit="onSubmit" :show-error-message="false" class="mt-20">
      <van-field
        class="con-input mt-82"
        v-model="username"
        placeholder="请输入手机号"
        :rules="[{ required: true, message: '请输入手机号' }]"
      />
      <van-field
        class="con-input mt-36"
        v-model="password"
        type="password"
        placeholder="请输入密码"
        :rules="[{ required: true, message: '请输入密码' }]"
      />
      <div style="margin-top: 56px;">
        <van-button block type="primary" native-type="submit">提交</van-button>
      </div>
    </van-form>
  </div>
</template>

<script>
import { Form, Field, Button } from "vant";
export default {
  components: {
    [Form.name]: Form,
    [Field.name]: Field,
    [Button.name]: Button
  },
  data() {
    return {
      username: "",
      password: ""
    };
  },
  methods: {
    onSubmit() {}
  }
};
</script>

<style lang='scss' scoped>
.con-pd {
  padding: 20px 33px;
  h1 {
    font-size: 28px;
    color: #101010;
  }
}
.con-input{
  border: 1px solid #bbbbbb;
}
.mt-82{
  margin-top:82px;
}
.mt-36{
  margin-top: 36px;
}
</style>
